package com.jsm.tf.service;

import com.jsm.tf.exception.BusinessException;
import com.jsm.tf.response.TfResponse;
import com.jsm.tf.view.dialog.TFDialog;
import de.felixroske.jfxsupport.GUIState;

public class BaseService {
    public void delTfResponse(TfResponse response,String title){
        if(!response.isSuccess()){
            TFDialog.showMessageDialog(GUIState.getStage(),response.getErrorMsg(),title);
        }else{
            throw new BusinessException(response.getErrorMsg(),title);
        }
    }
}
